# -*- coding:utf8 -*- #
# -----------------------------------------------------------------------------------
# ProjectName:  smalleel-api-tools
# FileName:     ipUtil.py
# Author  :
# Datetime:     2023/2/14 18:09
# Description：
# -----------------------------------------------------------------------------------
import socket

from common.util.configUtil.configUtil import ConfigUtil


def get_ip_status() -> bool:
    serverIp1 = ConfigUtil().get_serverIp("serverIp1")
    serverIp2 = ConfigUtil().get_serverIp("serverIp2")
    localHost = socket.gethostbyname(socket.gethostname())
    if localHost == serverIp1 or localHost == serverIp2:
        return True
    else:
        return False


if __name__ == '__main__':
    print(get_ip_status())
